/*
 *  Copyright 2019-2023 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package me.zhengjie.stock.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @author dolojia
 * @description /
 * @date 2024-05-04
 **/
@Data
@TableName("tbl_stock_info")
public class TblStockInfo implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "自增主键")
    private Integer id;

    @NotBlank
    @ApiModelProperty(value = "股票代码")
    private String code;

    @NotBlank
    @ApiModelProperty(value = "股票名称")
    private String name;

    @ApiModelProperty(value = "市场（0:深证A股，1:上证A股）")
    private Integer market;

    @ApiModelProperty(value = "行业")
    private String industry;

    @ApiModelProperty(value = "城市")
    private String city;

    @ApiModelProperty(value = "股票状态（0:1）")
    private Integer openStatus;

    /**
     * 概念
     */
    @ApiModelProperty(value = "概念")
    private String concept;


    @ApiModelProperty(value = "gmtCreate")
    private Date gmtCreate;

    @ApiModelProperty(value = "gmtModified")
    private Date gmtModified;

    public void copy(TblStockInfo source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
